<?php
    $order_id=str_check($_REQUEST['orderid']);
if(is_numeric($order_id)) {
    $sql = 'select * from pay_online where uid=' . $_SESSION['usersid'] . ' and order_id=\'' . $order_id . '\'';
    $info=$db->fetch_first($sql);
    if($info['cz_type']==1){
        $url=$yj_config[1]['yj_value'];
        /*include_once 'payment/zalipay.php';
        $Pay=new zalipay();
        $result=$Pay->pay($order_id,$info['rmb'] );
        var_dump($result);exit;
        if($result['status']==0){
            $url=$result['message'];
        }else{
            header('location:/smbinfo.php?orderid='.$order_id.'&act=recharge_order_pay');
        }*/
    }elseif ($info['cz_type']==4 ){
       $url=$yj_config[2]['yj_value'];
    }elseif ( $info['cz_type']==2){
        $url=$yj_config[2]['yj_value'];
    }elseif ($info['cz_type']==2){
        include_once 'payment/wx_qrcode.php';
        $Wx=new wx_qrcode();

        $img=$Wx->get_code(array('order_sn'=>$order_id,'order_amount'=>$info['rmb'],'log_id'=>$order_id));
    }
}
?>
<script type='text/javascript' src='js/jquery.zclip.js'></script>
<script type='text/javascript'  >

    $(document).ready(function(){
        if ( window.clipboardData ) {
            $('#copy_acount').click(function(){
                window.clipboardData.setData('Text','ozc6677');
                alert('复制成功，你可以用ctrl+v粘贴了');
            });

            $('#copy_remark').click(function(){
                window.clipboardData.setData('Text','84816b');
                alert('复制成功，你可以用ctrl+v粘贴了');
            });


            $('#copy_name').click(function(){
                window.clipboardData.setData('Text','ozc6677');
                alert('复制成功，你可以用ctrl+v粘贴了');
            });

        }else{
            $('#copy_name').zclip({
                path: '/js/ZeroClipboard.swf',
                copy: function(){
                    return 'ozc6677';
                },
                afterCopy:function(){/* 复制成功后的操作 */
                    alert('复制成功，你可以用ctrl+v粘贴了');
                }
            });
            $('#copy_remark').zclip({
                path: '/js/ZeroClipboard.swf',
                copy: function(){
                    return '84816b';
                },
                afterCopy:function(){/* 复制成功后的操作 */
                    alert('复制成功，你可以用ctrl+v粘贴了');
                }
            });
            $('#copy_acount').zclip({
                path: '/js/ZeroClipboard.swf',
                copy: function(){
                    return 'ozc6677';
                },
                afterCopy:function(){/* 复制成功后的操作 */
                    alert('复制成功，你可以用ctrl+v粘贴了');
                }
            });
        }
    });
</script>


<div class='panel panel-default'>
    <div class='panel-heading'>客服直充</div>
    <div class='panel-body'>
        <p style='font-size:18px;'><strong>充值流程:</strong>　<strong>1.创建订单　>></strong>　<strong style='color:#f00;'>2.扫描付款</strong></p>
        <div class='pay_money'>
            <table class='table table-striped table-hover table-bordered'>
                <tr>
                    <td>付款方式：</td>
                    <td><?php if($info['cz_type']==1){echo '支付宝';}elseif($info['cz_type']==2){echo '微信';}elseif($info['cz_type']==4){echo '网银在线';}?></td>
                    <td rowspan='7'><?php if($url){?><img src='<?php echo $url;?>' style='width:300px; height:300px; padding:0; margin:0;'/><php }else{?>  <?php }?></td>
                    </tr>
                <tr>
                    <td>演示28收款账号：</td>
                    <td><?php if($info['cz_type']==1){echo $ali_acc;}elseif($info['cz_type']==2){echo $wx_acc;}?></td>
                    </tr>
                <tr>
                    <td>收款人姓名：</td>
                    <td><?php if($info['cz_type']==1){echo $ali_name;}elseif($info['cz_type']==2){echo $wx_name;}?></td>
                    </tr>
                <tr>
                    <td>支付备注：</td>
                    <td> <?php echo substr($info['order_id'],-6,6);?> </td>
                    </tr>
                <tr>
                    <td>充值金额：</td>
                    <td>￥<?php echo $info['rmb'];?></td>
                    </tr>
                <tr>
                    <td>充值订单号：</td>
                    <td><?php echo $info['order_id'];?></td>
                    </tr>
                <tr>
                    <td>订单状态：</td>
                    <td><?php if($info['state']==0){echo '未完成';}elseif($info['state']==1){echo '已支付';}else{echo '支付失败';}?></td>
                    </tr>
                <tr>
                    <td>付款人姓名:</td>
                    <td colspan='2'><?php echo $info['name'];?></td>
                    </tr>
                <tr>
                    <td>付款帐号:</td>
                    <td colspan='2'><?php echo $info['account'];?></td>
                    </tr>
                <tr>
                    <td colspan='3'><a href="javascript:;" onClick="getContent('smbinfo.php?orderid=<?php echo $order_id?>','recharge_order_pay');"  class='btn btn-danger btn-block;' >刷新订单状态</td>
                    </tr>
                </table>
            </div>
        </div>
    </div>